package com.sxz.sbs.module.photo;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by Administrator on 2017/12/7 0007.
 */

public class PhotoViewerBean implements Parcelable {
    private int positionIndex;
    private List<String> photos;

    public PhotoViewerBean(List<String> photos, int positionIndex) {
        this.positionIndex = positionIndex;
        this.photos = photos;
    }

    public int getPositionIndex() {
        return positionIndex;
    }

    public List<String> getPhotos() {
        return photos;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.positionIndex);
        dest.writeStringList(this.photos);
    }

    protected PhotoViewerBean(Parcel in) {
        this.positionIndex = in.readInt();
        this.photos = in.createStringArrayList();
    }

    public static final Parcelable.Creator<PhotoViewerBean> CREATOR = new Parcelable.Creator<PhotoViewerBean>() {
        @Override
        public PhotoViewerBean createFromParcel(Parcel source) {
            return new PhotoViewerBean(source);
        }

        @Override
        public PhotoViewerBean[] newArray(int size) {
            return new PhotoViewerBean[size];
        }
    };
}
